import React from 'react';
import {Image, View, StyleSheet} from "react-native";

import FastImage from 'react-native-fast-image'


export default class ImageDemo1 extends React.Component {


  render() {
    return (
      <View style={{ flex: 1,
        alignItems: 'center', justifyContent: 'space-between'}}>
        <Image
          source={{uri: 'https://i.imgur.com/MABUbpDl.jpg'}}
          resizeMode={'stretch'}
          style={styles.image}/>

        <FastImage
          style={styles.image}
          source={{
            uri: 'https://unsplash.it/400/400?image=1',
            headers: {Authorization: 'someAuthToken'},
            priority: FastImage.priority.normal,
          }}
          resizeMode={FastImage.resizeMode.contain}
        />
      </View>
    )

  }
}

const styles = StyleSheet.create({
  image: {
    width:200,height:200,borderRadius:100
  }
})